<template>
    <div>
        <v-front-header></v-front-header>
        <router-view></router-view>
        <v-front-bottom></v-front-bottom>
    </div>
    
</template>
<script>
import bus from '../common/bus';
import vFrontHeader from './FrontHeader';
import vFrontBottom from './FrontBottom';
export default {
    data() {
        return {
            collapse: false,
            fullscreen: false,
            name: 'linxin',
            message: 2
        };
    },
    computed: {
        username() {
            let username = localStorage.getItem('ms_username');
            return username ? username : this.name;
        }
    },
    methods: {
        // 用户名下拉菜单选择事件
        handleCommand(command) {
            if (command == 'loginout') {
                localStorage.removeItem('ms_username');
                this.$router.push('/login');
            }
        },
        // 侧边栏折叠
        collapseChage() {
            this.collapse = !this.collapse;
            bus.$emit('collapse', this.collapse);
        },
    },
    mounted() {
        if (document.body.clientWidth < 1500) {
            this.collapseChage();
        }
    },
    components: {
        vFrontHeader,
        vFrontBottom
    }
};
</script>
<style scoped>

</style>
